package com.ruoyi.shop.modules.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 优惠券订单对象 mkt_voucher_order
 *
 * @author bcxj
 * @date 2024-07-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VoucherOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 下单的用户id
     */
    @Excel(name = "下单的用户id")
    private String userId;

    /**
     * 购买的代金券id
     */
    @Excel(name = "购买的代金券id")
    private String voucherId;

    /**
     * 支付方式
     */
    @Excel(name = "支付方式")
    private String payType;

    /**
     * 订单状态
     */
    @Excel(name = "订单状态")
    private String status;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /**
     * 核销时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "核销时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useTime;

    /**
     * 退款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;

    public void setId(Long id) {
        this.id = id;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setVoucherId(String voucherId) {
        this.voucherId = voucherId;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public void setUseTime(Date useTime) {
        this.useTime = useTime;
    }

    public void setRefundTime(Date refundTime) {
        this.refundTime = refundTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("voucherId", getVoucherId())
                .append("payType", getPayType())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("payTime", getPayTime())
                .append("useTime", getUseTime())
                .append("refundTime", getRefundTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
